package election.platform;

import java.util.LinkedList;
import java.util.Queue;

import election.api.Get;
import election.api.Put;



public class MyQueue implements Get<Object>, Put
{
    Queue<Object> queue = new LinkedList<Object>();
    

    @Override
    public void put(String subset, Object obj) 
    {
        throw new RuntimeException("not supported");
    }

    @Override
    public synchronized void put(Object obj)
    {
            queue.add(obj);
    }

    @Override
    public synchronized Object get() throws Exception
    {
        return queue.poll();
    }
}